#ifndef CAMERACLIENT_H
#define CAMERACLIENT_H

#include <QObject>
#include <QHostAddress>
#include <QImage>
#include <QByteArray>
#include <QTcpSocket>
class cameraclient : public QObject
{
    Q_OBJECT
public:
    explicit cameraclient(QObject *parent = 0);
    ~cameraclient();
    void connectToHost(const QHostAddress &ip,quint16 port);
    void requestImage(void);
protected:
    QByteArray imageArray;
    QTcpSocket tcpSocket;
    QImage image;
signals:
    void newImageReady(QImage img);
    void face(QImage img);
public slots:
    void readImage(void);
};

#endif // CAMERACLIENT_H
